home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / haeberli / include / objfnt.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  2KB  |  104 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef OBJFNTDEF
  18. #define OBJFNTDEF
  19.  
  20. typedef struct chardesc {
  21.     short movex, movey;        /* advance */
  22.     short llx, lly;        /* bounding box */
  23.     short urx, ury;
  24.     short *data;        /* char data */
  25.     long datalen;        
  26. } chardesc;
  27.  
  28. typedef struct objfnt {
  29.     struct objfnt *freeaddr;    /* if freeaddr != 0, objfnt is one chunck */
  30.     short type;
  31.     short charmin, charmax;
  32.     short nchars;
  33.     short scale;
  34.     chardesc *chars;
  35. } objfnt;
  36.  
  37. #define OFMAGIC        0x93339333
  38.  
  39. #define TM_TYPE        1
  40. #define PO_TYPE        2
  41. #define SP_TYPE        3
  42.  
  43. /* ops for tmesh characters */
  44.  
  45. #define    TM_BGNTMESH    (1)
  46. #define    TM_SWAPTMESH    (2)
  47. #define    TM_ENDBGNTMESH    (3)
  48. #define    TM_RETENDTMESH    (4)
  49. #define    TM_RET        (5)
  50.  
  51. /* ops for poly characters */
  52.  
  53. #define    PO_BGNLOOP    (1)
  54. #define    PO_ENDBGNLOOP    (2)
  55. #define    PO_RETENDLOOP    (3)
  56. #define    PO_RET        (4)
  57.  
  58. /* ops for spline  characters */
  59.  
  60. #define    SP_MOVETO    (1)
  61. #define    SP_LINETO    (2)
  62. #define    SP_CURVETO    (3)
  63. #define    SP_CLOSEPATH    (4)
  64. #define    SP_RETCLOSEPATH    (5)
  65. #define    SP_RET        (6)
  66.  
  67.  
  68. #define MIN_ASCII     ' '
  69. #define MAX_ASCII     '~'
  70. #define NASCII        (224)
  71. #define NSYMBL        (224)
  72. #define NZAPFD        (224)
  73. #define NACCENT        (14)
  74. #define ACCENTBASE    (400)
  75.  
  76. #define NOBBOX        (30000)
  77.  
  78. typedef struct pschar {
  79.     char *name;
  80.     int code;
  81.     int prog;
  82. } pschar;
  83.  
  84. extern pschar charlist[NASCII];
  85. extern pschar scharlist[NSYMBL];
  86. extern pschar zcharlist[NZAPFD];
  87. extern pschar accentlist[NACCENT];
  88.  
  89. objfnt *fontname();
  90. objfnt *readobjfnt();
  91. objfnt *newobjfnt();
  92. float fontstringwidth();
  93. short *getcharprog();
  94. chardesc *getchardesc();
  95. char *asciiname();
  96. objfnt *readtype1(char *infont,float beztolerance,int fullset);
  97.  
  98. typedef struct mat2d {
  99.     double a, b, c, d;
  100.     double tx, ty;
  101. } mat2d;
  102.  
  103. #endif
  104.